<!doctype html>
<html>
<head>
    <include file="public/head"/>
    <title>图表统计</title>
    <meta name="description" content="图表统计">
    <meta name="keywords" content="图表统计">
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>配置中心</a></li>
        <li class=""><a href="{:cmf_plugin_url('QbtGraphical://AdminIndex/add')}">添加配置</a></li>
    </ul>
    <form method="post" class="js-ajax-form margin-top-20" action="#">
        <div class="table_list">
            <table width="100%" class="table table-hover">
                <thead>
                <tr>
                    <th>id</th>
                    <th>菜单名称</th>
                    <th>图形标题</th>
                    <th>主表名</th>
                    <th>X轴显示方式</th>
                    <th>X轴名称</th>
                    <th>统计名</th>
                    <th>图表形状</th>
                    <th>是否生成新菜单</th>
                    <th>是否关联</th>
                    <th>主表关联ID</th>
                    <th>附表关联id</th>
                    <th>附表名</th>
                    <th width="120">操作</th>
                </tr>
                </thead>
                <tbody>
                <?php
                    if(count($lists)>0){
                        foreach($lists as $val){
                ?>
                <tr>
                    <td>{$val['id']}</td>
                    <td>{$val['name']}</td>
                    <td>{$val['title']}</td>
                    <td>{$val['table']}</td>
                    <td>{$val['x_axis_val']==1?'时间轴':'自定义标题'}</td>
                    <td>{$val['x_axis_name']?$val['x_axis_name']:$val['x_axis_time']=='1'?'最近一周':'最近一个月'}</td>
                    <td>{$val['category_name']}</td>

                    <td><?php
                        switch($val['shape']){
                            case 1:
                               echo '折线图';
                                break;

                            case 2:
                              echo  '柱状图';
                                break;

                            case 3:
                              echo  '饼图';
                                break;
                        }
                        ?></td>
                    <td>{$val['is_menu']==1?'生成单独页面':"多个图形合并"}</td>
                    <td>{$val['is_join']==1?'是':'否'}</td>
                    <td>{$val['main_table_id']}</td>
                    <td>{$val['assistant_table_id']}</td>
                    <td>{$val['assistant_table']}</td>
                    <td width="120">
                        <a href="{:cmf_plugin_url('QbtGraphical://AdminIndex/edit',['id'=>$val['id']])}" >{:lang('EDIT')}</a>
                        <a href="{:cmf_plugin_url('QbtGraphical://AdminIndex/delete',['id'=>$val['id']])}" class="js-ajax-delete" >{:lang('DELETE')}</a>
                    </td>
                </tr>
                <?php
                        }
                    }else{
                ?>
                <tr><td colspan="4">暂无数据</td></tr>
                <?php
                    }
                ?>
                </tbody>
            </table>
        </div>
    </form>
</div>
<include file="public/scripts"/>
</body>
</html>